[id].vue 94 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527
  1. <template>
  2. <div>
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 页面导航 -->
  6. <HomePageNavigation></HomePageNavigation>
  7. <!-- 二级标题-->
  8. <HomeSecondaryHeading :titleName="routeName" :titleData="pageCategory"></HomeSecondaryHeading>
  9. <!-- {{ name }} -->
  10. <!-- 第一层 -->
  11. <div class="farmingPartOne">
  12. <div class="inner">
  13. <div class="innerLeft" v-if="pageData[0]">
  14. <div class="title">
  15. <h3>
  16. <NuxtLink :to="{ path: `/newsList/${pageData[0].cid}`}" target="_blank" v-if="pageData[0]">
  17. {{ pageData[0].title }}
  18. </NuxtLink>
  19. <span>
  20. <NuxtLink
  21. :to="{ path: `/newsList/${pageData[0].cid}`}"
  22. target="_blank" v-if="pageData[0]">查看更多</NuxtLink>
  23. </span>
  24. </h3>
  25. </div>
  26. <div class="leftTop">
  27. <div class="leftTopPhoto left" >
  28. <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[0].data[0]&&pageData[0].data[0].islink==1">
  29. <img :src="pageData[0].data[0].imgurl">
  30. <span>{{pageData[0].data[0].title }}</span>
  31. </NuxtLink>
  32. <NuxtLink :to="{ path: `/newsDetail/${pageData[0].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  33. target="_blank" v-if="pageData[0].data[0]&&pageData[0].data[0].islink==0">
  34. <img :src="pageData[0].data[0].imgurl">
  35. <span>{{pageData[0].data[0].title}}</span>
  36. </NuxtLink>
  37. </div>
  38. <ul class="left">
  39. <li v-for="item in pageData[0].data">
  40. <em></em>
  41. <span>
  42. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  43. <NuxtLink
  44. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  45. target="_blank" v-if="item.islink==0">{{ item.title }}
  46. </NuxtLink>
  47. </span>
  48. </li>
  49. </ul>
  50. </div>
  51. <ul class="leftBottom" v-if="pageData[0]">
  52. <li v-for="item in pageData[0].data2">
  53. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  54. <img :src="item.imgurl">
  55. </NuxtLink>
  56. <NuxtLink
  57. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  58. target="_blank" v-if="item.islink==0">
  59. <img :src="item.imgurl">
  60. </NuxtLink>
  61. <p>
  62. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  63. <NuxtLink
  64. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  65. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  66. </p>
  67. </li>
  68. </ul>
  69. </div>
  70. <div class="innerRight" v-if="pageData[1].cid!=''">
  71. <div class="title">
  72. <h3>
  73. <NuxtLink :to="{ path: `/newsList/${pageData[1].cid}`}" target="_blank" v-if="pageData[1]">
  74. {{ pageData[1].title }}
  75. </NuxtLink>
  76. <span>
  77. <NuxtLink
  78. :to="{ path: `/newsList/${pageData[1].cid}`}"
  79. v-if="pageData[1]" target="_blank">查看更多</NuxtLink>
  80. </span>
  81. </h3>
  82. </div>
  83. <ul class="rightList">
  84. <li v-for="item in pageData[1].data">
  85. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  86. <NuxtLink
  87. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  88. target="_blank" v-if="item.islink==0">
  89. <img class="left" :src="item.imgurl">
  90. </NuxtLink>
  91. <p class="left">
  92. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  93. <NuxtLink
  94. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  95. target="_blank" v-if="item.islink==0">
  96. {{ item.title }}
  97. </NuxtLink>
  98. </p>
  99. </li>
  100. </ul>
  101. </div>
  102. </div>
  103. </div>
  104. <!-- 三农资讯logo -->
  105. <HomeSannongzixun></HomeSannongzixun>
  106. <!-- 第二层 -->
  107. <div class="farmingPartTwo" v-if="pageData[2].cid!=''&&pageData[3].cid!=''&&pageData[4].cid!=''">
  108. <div class="inner">
  109. <div class="farmer" v-if="pageData[2].cid!=''">
  110. <div class="title">
  111. <h3>
  112. <NuxtLink :to="{ path: `/newsList/${pageData[2].cid}`}" target="_blank" v-if="pageData[2]">
  113. {{ pageData[2].title }}
  114. </NuxtLink>
  115. <span>
  116. <NuxtLink
  117. :to="{ path: `/newsList/${pageData[2].cid}`, query: { catid: pageData[2].cid } }"
  118. v-if="pageData[2]" target="_blank">查看更多</NuxtLink>
  119. </span>
  120. </h3>
  121. </div>
  122. <div class="PartTwoPhoto" v-if="pageData[2].data[0]">
  123. <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[2].data[0].islink==1">
  124. <img :src="pageData[2].data[0].imgurl">
  125. <span>{{ pageData[2].data[0].title }}</span>
  126. </NuxtLink>
  127. <NuxtLink
  128. :to="{ path: `/newsDetail/${pageData[2].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  129. target="_blank" v-if="pageData[2].data[0].islink==0">
  130. <img :src="pageData[2].data[0].imgurl">
  131. <span>{{ pageData[2].data[0].title }}</span>
  132. </NuxtLink>
  133. </div>
  134. <ul class="PartTwoList">
  135. <li v-for="item in pageData[2].data">
  136. <em></em>
  137. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  138. <NuxtLink
  139. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  140. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  141. </li>
  142. </ul>
  143. </div>
  144. <div class="farmer" v-if="pageData[3].cid!=''">
  145. <div class="title">
  146. <h3>
  147. <NuxtLink :to="{ path: `/newsList/${pageData[3].cid}`}" target="_blank" v-if="pageData[3]">
  148. {{ pageData[3].title }}
  149. </NuxtLink>
  150. <span>
  151. <NuxtLink
  152. :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid } }"
  153. v-if="pageData[3]" target="_blank">查看更多</NuxtLink>
  154. </span>
  155. </h3>
  156. </div>
  157. <div class="PartTwoPhoto" v-if="pageData[3].data[0]">
  158. <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[3].data[0].islink==1">
  159. <img :src="pageData[3].data[0].imgurl">
  160. <span>{{ pageData[3].data[0].title }}</span>
  161. </NuxtLink>
  162. <NuxtLink
  163. :to="{ path: `/newsDetail/${pageData[3].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  164. target="_blank" v-if="pageData[3].data[0].islink==0">
  165. <img :src="pageData[3].data[0].imgurl">
  166. <span>{{ pageData[3].data[0].title }}</span>
  167. </NuxtLink>
  168. </div>
  169. <ul class="PartTwoList">
  170. <li v-for="item in pageData[3].data">
  171. <em></em>
  172. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  173. <NuxtLink
  174. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  175. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  176. </li>
  177. </ul>
  178. </div>
  179. <div class="farmer" v-if="pageData[4].cid!=''">
  180. <div class="title">
  181. <h3>
  182. <NuxtLink :to="{ path: `/newsList/${pageData[4].cid}`}" target="_blank" v-if="pageData[4]">
  183. {{ pageData[4].title }}
  184. </NuxtLink>
  185. <span>
  186. <NuxtLink
  187. :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid } }"
  188. v-if="pageData[4]" target="_blank">查看更多</NuxtLink>
  189. </span>
  190. </h3>
  191. </div>
  192. <div class="PartTwoPhoto" v-if="pageData[4].data[0]">
  193. <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[4].data[0].islink==1">
  194. <img :src="pageData[4].data[0].imgurl">
  195. <span>{{ pageData[4].data[0].title }}</span>
  196. </NuxtLink>
  197. <NuxtLink
  198. :to="{ path: `/newsDetail/${pageData[4].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  199. target="_blank" v-if="pageData[4].data[0].islink==0">
  200. <img :src="pageData[4].data[0].imgurl">
  201. <span>{{ pageData[4].data[0].title }}</span>
  202. </NuxtLink>
  203. </div>
  204. <ul class="PartTwoList">
  205. <li v-for="item in pageData[4].data">
  206. <em></em>
  207. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  208. <NuxtLink
  209. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  210. target="_blank" v-if="item.islink==0">
  211. {{ item.title }}
  212. </NuxtLink>
  213. </li>
  214. </ul>
  215. </div>
  216. </div>
  217. </div>
  218. <!-- 三农资讯logo -->
  219. <HomeSannongzixun></HomeSannongzixun>
  220. <!-- 第三层 -->
  221. <div class="zixuntuijian" v-if="pageData[5].cid!=''&&pageData[6].cid!=''&&pageData[7].cid!=''&&pageData[8].cid!=''&&pageData[9].cid!=''">
  222. <div class="inner">
  223. <div class="innerLeft" >
  224. <div class="zixunTop">
  225. <div class="zixunLeft" v-if="pageData[5].cid!=''">
  226. <div class="title">
  227. <h3>
  228. <NuxtLink :to="{ path: `/newsList/${pageData[5].cid}`}" target="_blank" v-if="pageData[5]">
  229. {{ pageData[5].title }}
  230. </NuxtLink>
  231. <span>
  232. <NuxtLink
  233. :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid } }"
  234. v-if="pageData[5]" target="_blank">查看更多</NuxtLink>
  235. </span>
  236. </h3>
  237. </div>
  238. <ul class="photo_text">
  239. <li v-for="(item, index) in pageData[5].data">
  240. <article v-if="index == 0">
  241. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  242. <img :src="item.imgurl" alt="">
  243. </NuxtLink>
  244. <NuxtLink
  245. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  246. target="_blank" v-if="item.islink==0">
  247. <img :src="item.imgurl" alt="">
  248. </NuxtLink>
  249. <div>
  250. <h5>
  251. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  252. <NuxtLink
  253. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  254. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  255. </h5>
  256. <p>
  257. <span>{{ item.author }}</span>
  258. <span>{{ getDays(item.created_at) }}</span>
  259. </p>
  260. </div>
  261. </article>
  262. <article v-else>
  263. <em></em>
  264. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  265. <NuxtLink
  266. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  267. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  268. </article>
  269. </li>
  270. </ul>
  271. </div>
  272. <div class="zixunRight" v-if="pageData[6].cid!=''">
  273. <div class="title">
  274. <h3>
  275. <NuxtLink :to="{ path: `/newsList/${pageData[6].cid}`}" target="_blank" v-if="pageData[6]">
  276. {{ pageData[6].title }}
  277. </NuxtLink>
  278. <span>
  279. <NuxtLink
  280. :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
  281. v-if="pageData[6]" target="_blank">查看更多</NuxtLink>
  282. </span>
  283. </h3>
  284. </div>
  285. <div class="towPic">
  286. <div v-for="(item, index) in pageData[6].data" class="picBox">
  287. <div v-if="index <= 1">
  288. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  289. <img :src="item.imgurl">
  290. </NuxtLink>
  291. <NuxtLink
  292. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  293. target="_blank" v-if="item.islink==0">
  294. <img :src="item.imgurl">
  295. </NuxtLink>
  296. </div>
  297. </div>
  298. </div>
  299. <ul class="photo_text">
  300. <li v-for="(item, index) in pageData[6].data">
  301. <article v-if="index > 1">
  302. <em></em>
  303. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  304. <NuxtLink
  305. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  306. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  307. </article>
  308. </li>
  309. </ul>
  310. </div>
  311. </div>
  312. <div class="zixunBottom" v-if="pageData[6].cid!=''">
  313. <img class="left" :src="pageData[7].data[0].imgurl"
  314. v-if="pageData[7].data[0] && hoverStatus == 0">
  315. <img class="left" :src="pageData[7].data[1].imgurl"
  316. v-if="pageData[7].data[0] && hoverStatus == 1">
  317. <img class="left" :src="pageData[7].data[2].imgurl"
  318. v-if="pageData[7].data[0] && hoverStatus == 2">
  319. <img class="left" :src="pageData[7].data[3].imgurl"
  320. v-if="pageData[7].data[0] && hoverStatus == 3">
  321. <img class="left" :src="pageData[7].data[4].imgurl"
  322. v-if="pageData[7].data[0] && hoverStatus == 4">
  323. <img class="left" :src="pageData[7].data[5].imgurl"
  324. v-if="pageData[7].data[0] && hoverStatus == 5">
  325. <ul class="leftList left">
  326. <li v-for="(item, index) in pageData[7].data" @mouseenter="qhPic(index)">
  327. <h4>
  328. <em></em>
  329. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  330. <NuxtLink
  331. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  332. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  333. </h4>
  334. </li>
  335. </ul>
  336. </div>
  337. </div>
  338. <div class="innerRight" v-if="pageData[8].cid!=''">
  339. <div class="title">
  340. <h3>
  341. <NuxtLink :to="{ path: `/newsList/${pageData[8].cid}`}" target="_blank" v-if="pageData[8]">
  342. {{ pageData[8].title }}
  343. </NuxtLink>
  344. <span>
  345. <NuxtLink
  346. :to="{ path: `/newsList/${pageData[8].cid}`, query: { catid: pageData[8].cid } }"
  347. v-if="pageData[8]" target="_blank">查看更多</NuxtLink>
  348. </span>
  349. </h3>
  350. </div>
  351. <ul class="information">
  352. <li v-for="item in pageData[8].data">
  353. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  354. <img :src="item.imgurl">
  355. </NuxtLink>
  356. <NuxtLink
  357. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  358. target="_blank" v-if="item.islink==0">
  359. <img :src="item.imgurl">
  360. </NuxtLink>
  361. <div class="text">
  362. <h5>
  363. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  364. <NuxtLink :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }" target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  365. </h5>
  366. <p>{{ item.author }}</p>
  367. </div>
  368. </li>
  369. </ul>
  370. </div>
  371. </div>
  372. </div>
  373. <HomeTopTen :imgurl="adList[2]" v-if="adList[2]"></HomeTopTen>
  374. <div class="farming" v-if="pageData[9].cid!=''&&pageData[10].cid!=''&&pageData[11].cid!=''">
  375. <div class="inner">
  376. <div class="innerLeft" v-if="pageData[9].cid!=''">
  377. <div class="farmer">
  378. <h3>
  379. <NuxtLink :to="{ path: `/newsList/${pageData[9].cid}`}" target="_blank" v-if="pageData[9]">
  380. {{ pageData[9].title }}
  381. </NuxtLink>
  382. <span>
  383. <NuxtLink
  384. :to="{ path: `/newsList/${pageData[9].cid}`, query: { catid: pageData[9].cid } }"
  385. v-if="pageData[9]" target="_blank">查看更多</NuxtLink>
  386. </span>
  387. </h3>
  388. <ul>
  389. <li v-for="item in pageData[9].data">
  390. <em></em>
  391. <span>
  392. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  393. <NuxtLink
  394. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  395. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  396. </span>
  397. </li>
  398. </ul>
  399. </div>
  400. <div class="farmer">
  401. <h3>
  402. <NuxtLink :to="{ path: `/newsList/${pageData[10].cid}`}" target="_blank" v-if="pageData[10]">
  403. {{ pageData[10].title }}
  404. </NuxtLink>
  405. <span>
  406. <NuxtLink
  407. :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[10].cid } }"
  408. target="_blank" v-if="pageData[10]">查看更多</NuxtLink>
  409. </span>
  410. </h3>
  411. <ul>
  412. <li v-for="item in pageData[10].data">
  413. <em></em>
  414. <span>
  415. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  416. <NuxtLink
  417. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  418. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  419. </span>
  420. </li>
  421. </ul>
  422. </div>
  423. </div>
  424. <div class="innerRight" v-if="pageData[11].cid!=''">
  425. <h3>
  426. <NuxtLink :to="{ path: `/newsList/${pageData[11].cid}`}" target="_blank" v-if="pageData[11]">
  427. {{ pageData[11].title }}
  428. </NuxtLink>
  429. <span>
  430. <NuxtLink
  431. :to="{ path: `/newsList/${pageData[11].cid}`, query: { catid: pageData[11].cid } }"
  432. target="_blank" v-if="pageData[11]">查看更多</NuxtLink>
  433. </span>
  434. </h3>
  435. <div class="banner">
  436. <HomeSmallSwiper :swiperData="pageData[11].data"></HomeSmallSwiper>
  437. </div>
  438. <div class="banner_b_img">
  439. <div class="photo">
  440. <article v-for="(item, index) in pageData[11].data2">
  441. <div class="photoL" v-if="index == 0">
  442. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  443. <img :src="item.imgurl">
  444. <span>{{ item.title }}</span>
  445. </NuxtLink>
  446. <NuxtLink
  447. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  448. target="_blank" v-if="item.islink==0">
  449. <img :src="item.imgurl">
  450. <span>{{ item.title }}</span>
  451. </NuxtLink>
  452. </div>
  453. <div class="photoL" v-if="index == 1">
  454. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  455. <img :src="item.imgurl">
  456. <span>{{ item.title }}</span>
  457. </NuxtLink>
  458. <NuxtLink
  459. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  460. target="_blank" v-if="item.islink==0">
  461. <img :src="item.imgurl">
  462. <span>{{ item.title }}</span>
  463. </NuxtLink>
  464. </div>
  465. </article>
  466. </div>
  467. </div>
  468. <div class="banner_text_list">
  469. <ul>
  470. <li v-for="item in pageData[11].data3">
  471. <em></em>
  472. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  473. <span>{{ item.title }}</span>
  474. </NuxtLink>
  475. <NuxtLink
  476. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  477. target="_blank" v-if="item.islink==0">
  478. <span>{{ item.title }}</span>
  479. </NuxtLink>
  480. </li>
  481. </ul>
  482. </div>
  483. </div>
  484. </div>
  485. </div>
  486. <!-- 十强称号logo -->
  487. <HomeTopTenTitle></HomeTopTenTitle>
  488. <!-- 第五层 -->
  489. <div class="scienceEducation" v-if="pageData[12].cid!=''&&pageData[13].cid!=''">
  490. <div class="inner">
  491. <div class="innerLeft" v-if="pageData[12].cid!=''">
  492. <div class="slider">
  493. <div class="scienceTitle">
  494. <h5>
  495. <NuxtLink :to="{ path: `/newsList/${pageData[12].cid}`}" target="_blank" v-if="pageData[12]">
  496. {{ pageData[12].title }}
  497. </NuxtLink>
  498. </h5>
  499. <p class="title">
  500. <span v-if="pageData[12]" @click="qhtabs(1)">
  501. <b v-if="showTabs == 1" class="active">{{ pageData[12].title1 }}</b>
  502. <b v-else class="noSelect">{{ pageData[12].title1 }}</b>
  503. </span>
  504. <span v-if="pageData[12]" @click="qhtabs(2)">
  505. <b v-if="showTabs == 2" class="active">{{ pageData[12].title2 }}</b>
  506. <b v-else class="noSelect">{{ pageData[12].title2 }}</b>
  507. </span>
  508. <span v-if="pageData[12]" @click="qhtabs(3)">
  509. <b v-if="showTabs == 3" class="active">{{ pageData[12].title3 }}</b>
  510. <b v-else class="noSelect">{{ pageData[12].title3 }}</b>
  511. </span>
  512. <span v-if="pageData[12]" @click="qhtabs(4)">
  513. <b v-if="showTabs == 4" class="active">{{ pageData[12].title4 }}</b>
  514. <b v-else class="noSelect">{{ pageData[12].title4 }}</b>
  515. </span>
  516. </p>
  517. </div>
  518. <div class="box">
  519. <div class="scienceListBox">
  520. <ul class="scienceList" v-if="showTabs == 1">
  521. <li v-for="item in pageData[12].data1">
  522. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
  523. <NuxtLink
  524. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  525. target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
  526. <p>
  527. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  528. <NuxtLink
  529. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  530. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  531. </p>
  532. </li>
  533. </ul>
  534. <ul class="scienceList" v-if="showTabs == 2">
  535. <li v-for="item in pageData[12].data2">
  536. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
  537. <NuxtLink
  538. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  539. target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
  540. <p>
  541. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  542. <NuxtLink
  543. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  544. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  545. </p>
  546. </li>
  547. </ul>
  548. <ul class="scienceList" v-if="showTabs == 3">
  549. <li v-for="item in pageData[12].data3">
  550. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
  551. <NuxtLink
  552. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  553. target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
  554. <p>
  555. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  556. <NuxtLink
  557. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  558. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  559. </p>
  560. </li>
  561. </ul>
  562. <ul class="scienceList" v-if="showTabs == 4">
  563. <li v-for="item in pageData[12].data4">
  564. <img :src="item.imgurl">
  565. <p>
  566. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  567. <NuxtLink
  568. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  569. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  570. </p>
  571. </li>
  572. </ul>
  573. </div>
  574. </div>
  575. </div>
  576. </div>
  577. <div class="innerRight" v-if="pageData[13].cid!=''">
  578. <h3>
  579. <NuxtLink :to="{ path: `/newsList/${pageData[13].cid}`}" target="_blank" v-if="pageData[13]">
  580. {{ pageData[13].title }}
  581. </NuxtLink>
  582. <span>
  583. <NuxtLink
  584. :to="{ path: `/newsList/${pageData[13].cid}`, query: { catid: pageData[13].cid } }"
  585. target="_blank" v-if="pageData[13]">查看更多</NuxtLink>
  586. </span>
  587. </h3>
  588. <ul class="sannongList">
  589. <li v-for="item in pageData[13].data3">
  590. <em></em>
  591. <span>
  592. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  593. <NuxtLink
  594. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  595. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  596. </span>
  597. </li>
  598. </ul>
  599. <div class="banner">
  600. <HomeSmallSwiper :swiperData="pageData[13].data"></HomeSmallSwiper>
  601. </div>
  602. <div class="banner_b_img">
  603. <div class="photo">
  604. <article v-for="(item, index) in pageData[13].data2">
  605. <div class="photoL" v-if="index == 0">
  606. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  607. <img :src="item.imgurl">
  608. <span>{{ item.title }}</span>
  609. </NuxtLink>
  610. <NuxtLink
  611. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  612. target="_blank" v-if="item.islink==0">
  613. <img :src="item.imgurl">
  614. <span>{{ item.title }}</span>
  615. </NuxtLink>
  616. </div>
  617. <div class="photoL" v-if="index == 1">
  618. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  619. <img :src="item.imgurl">
  620. <span>{{ item.title }}</span>
  621. </NuxtLink>
  622. <NuxtLink
  623. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  624. target="_blank" v-if="item.islink==0">
  625. <img :src="item.imgurl">
  626. <span>{{ item.title }}</span>
  627. </NuxtLink>
  628. </div>
  629. </article>
  630. </div>
  631. </div>
  632. </div>
  633. </div>
  634. </div>
  635. <!-- 页脚部分 -->
  636. <HomeFoot></HomeFoot>
  637. </div>
  638. </template>
  639. <script setup>
  640. //获取生命周期
  641. import { onMounted } from 'vue';
  642. //获得跳转过来的id
  643. const route = useRoute();
  644. const routeId = route.params.id; //获得该页面的id
  645. const routeName = route.query.name; //获得该页面的名称
  646. //获取行政部门和地区
  647. const cityid = route.query.cityid;
  648. const depId = route.query.department_id;
  649. //获得axios
  650. const nuxtApp = useNuxtApp();
  651. const axios = nuxtApp.$axios;
  652. // 定义响应式数据
  653. const seoData = ref({
  654. title: '三农资讯网',
  655. description: '默认描述',
  656. keywords: '默认关键词',
  657. image: 'https://example.com/default-image.jpg'
  658. });
  659. const hoverStatus = ref(1)
  660. const qhPic = function (num) {
  661. console.log(num)
  662. hoverStatus.value = num;
  663. }
  664. //获得所有广告
  665. const adList = ref("");
  666. const getadList = async () => {
  667. try {
  668. const response = await axios.get(`/web/getWebsiteAdvertisement`);
  669. adList.value = response.data;
  670. } catch (error) {
  671. console.error(error);
  672. }
  673. }
  674. // 在 onMounted 钩子中获取数据
  675. onMounted(async () => {
  676. // try {
  677. // const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${routeId}`);
  678. // const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
  679. // console.log(seoData.value.title)
  680. // // 更新 seoData
  681. // seoData.value = {
  682. // title: data.seo_title,
  683. // description: data.seo_description,
  684. // keywords: data.seo_keywords,
  685. // image: data.seo_image
  686. // };
  687. // console.log(seoData.value.title)
  688. // } catch (error) {
  689. // console.error('获取 SEO 数据失败:', error);
  690. // // 设置默认值
  691. // seoData.value = {
  692. // title: '三农资讯网',
  693. // description: '默认描述',
  694. // keywords: '默认关键词',
  695. // image: 'https://example.com/default-image.jpg'
  696. // };
  697. // }
  698. });
  699. // 监听 seoData 的变化,动态设置 SEO 字段
  700. watch(seoData, (newVal) => {
  701. if (newVal.title) { // 确保 title 有值
  702. useSeoMeta({
  703. title: newVal.title, // 使用动态值
  704. description: newVal.description,
  705. ogTitle: newVal.title,
  706. ogDescription: newVal.description,
  707. ogImage: newVal.image,
  708. twitterTitle: newVal.title,
  709. twitterDescription: newVal.description,
  710. twitterImage: newVal.image,
  711. keywords: newVal.keywords
  712. });
  713. }
  714. }, { immediate: true });
  715. //该页面上所有的导航池 转为动态数据
  716. const pageCategory = ref([]);
  717. //该页面上需要渲染的所有数据
  718. const pageData = ref([
  719. { id: 0, data: [], data2: [], title: "", cid: "" },
  720. { id: 1, data: [], title: "", cid: "" },
  721. { id: 2, data: [], title: "", cid: "" },
  722. { id: 3, data: [], title: "", cid: "" },
  723. { id: 4, data: [], title: "", cid: "" },
  724. { id: 5, data: [], title: "", cid: "" },
  725. { id: 6, data: [], title: "", cid: "" },
  726. { id: 7, data: [], title: "", cid: "" },
  727. { id: 8, data: [], title: "", cid: "" },
  728. { id: 9, data: [], title: "", cid: "" },
  729. { id: 10, data: [], title: "", cid: "" },
  730. { id: 10, data: [], title: "", cid: "" },
  731. {
  732. id: 11,
  733. title: "",
  734. data: [],
  735. data1: [],
  736. data2: [],
  737. data3: [],
  738. data4: [],
  739. category_id1: "",
  740. category_id2: "",
  741. category_id3: "",
  742. category_id4: "",
  743. title1: "",
  744. title2: "",
  745. title3: "",
  746. title4: "",
  747. cid: ""
  748. },
  749. { id: 12, data1: [], data2: [], data3: [], cid: "" },
  750. ])
  751. //第一种情况 直接获得二级导航
  752. //第一步:获得该分类下的所有二级导航
  753. const newCategory = useState("getWebsiteModelCategory", () => ''); //动态数据
  754. //placeid 固定为1
  755. //pid 由上个页面带过来的1级导航id
  756. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  757. const getWebsiteModelCategory = async () => {
  758. try {
  759. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${routeId}&num=${14}`);
  760. pageCategory.value = response.data;
  761. //给与板块标题
  762. for (let index in response.data) {
  763. pageData.value[index].title = response.data[index].name
  764. pageData.value[index].cid = response.data[index].category_id
  765. }
  766. console.log(pageData.value)
  767. console.log('pageCategory111111111111111', pageCategory.value)
  768. renderPage();
  769. } catch (error) {
  770. console.error(error);
  771. }
  772. }
  773. //第二种情况 用户搜索的二级导航
  774. const searchCategory = useState("selectWebsiteCategory", () => ''); //动态数据
  775. //placeid 固定为1
  776. //pid 由上个页面带过来的1级导航id
  777. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  778. const selectWebsiteCategory = async () => {
  779. try {
  780. const response = await axios.get(`/web/selectWebsiteCategory?pid=${routeId}&cityid=${cityid}&department_id=${depId}`);
  781. pageCategory.value = response.data;
  782. //给与板块标题
  783. for (let index in response.data) {
  784. pageData.value[index].title = response.data[index].name
  785. }
  786. console.log(pageData.value)
  787. console.log(pageCategory.value)
  788. renderPage2();
  789. } catch (error) {
  790. console.error(error);
  791. }
  792. }
  793. //第二步:获得对应分类下的数据
  794. const renderPage = function () {
  795. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  796. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  797. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  798. getWebsiteArticlesList(pageCategory.value[i].category_id, i)
  799. }
  800. }
  801. //第二步:获得搜索对应分类下的数据 - 因为字段名字不一样,这里做了一下区分
  802. const renderPage2 = function () {
  803. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  804. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  805. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  806. getWebsiteArticlesList(pageCategory.value[i].id, i)
  807. }
  808. }
  809. //第三步循环获取数据
  810. const getWebsiteArticlesList = async (name, listType) => {
  811. //第一层
  812. //板块1 图文
  813. if (listType == 0) {
  814. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${8}`);
  815. pageData.value[0].data = response.data
  816. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}&placeid=${9}`);
  817. pageData.value[0].data2 = response2.data
  818. }
  819. //板块2 图文
  820. if (listType == 1) {
  821. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  822. pageData.value[1].data = response.data;
  823. }
  824. //第二层
  825. //板块3 图文
  826. if (listType == 2) {
  827. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  828. pageData.value[2].data = response.data;
  829. }
  830. //板块4 图文
  831. if (listType == 3) {
  832. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  833. pageData.value[3].data = response.data;
  834. }
  835. //板块5 图文
  836. if (listType == 4) {
  837. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  838. pageData.value[4].data = response.data;
  839. }
  840. //第三层
  841. //板块6 图文
  842. if (listType == 5) {
  843. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  844. pageData.value[5].data = response.data;
  845. }
  846. //板块7 图文
  847. if (listType == 6) {
  848. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  849. pageData.value[6].data = response.data;
  850. }
  851. //板块8 图文
  852. if (listType == 7) {
  853. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  854. pageData.value[7].data = response.data;
  855. }
  856. //板块9 图文
  857. if (listType == 8) {
  858. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  859. pageData.value[8].data = response.data;
  860. }
  861. //第四层
  862. //板块10 文字
  863. if (listType == 9) {
  864. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  865. pageData.value[9].data = response.data;
  866. }
  867. //板块11 文字
  868. if (listType == 10) {
  869. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  870. pageData.value[10].data = response.data;
  871. }
  872. //板块12 轮播图 图文 文字
  873. if (listType == 11) {
  874. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  875. pageData.value[11].data = response.data;
  876. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  877. pageData.value[11].data2 = response2.data;
  878. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  879. pageData.value[11].data3 = response3.data;
  880. }
  881. //第五层
  882. //板块12 多级栏目 判断下面有没有子级 如果有每个取出来 6条图文
  883. if (listType == 12) {
  884. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${10}`);
  885. pageData.value[12].data = response.data;
  886. console.log("第一步获取父级id")
  887. console.log(pageCategory.value[12].children_count)
  888. console.log(pageCategory.value[12].category_id)
  889. //判断一下里面有没有子导航
  890. if (pageCategory.value[12].children_count != 0) {
  891. //开始请求子导航
  892. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${pageCategory.value[12].category_id}&num=${100}`);
  893. console.log("第二步获取子级数量")
  894. console.log(response.data.length)
  895. //获得标题
  896. //判断里面有几个
  897. for (let i = 1; i <= response.data.length; i++) {
  898. if (i == 1) {
  899. pageData.value[12].title1 = response.data[0].name
  900. pageData.value[12].category_id1 = response.data[0].category_id
  901. }
  902. if (i == 2) {
  903. pageData.value[12].title2 = response.data[1].name
  904. pageData.value[12].category_id2 = response.data[1].category_id
  905. }
  906. if (i == 3) {
  907. pageData.value[12].title3 = response.data[2].name
  908. pageData.value[12].category_id3 = response.data[2].category_id
  909. }
  910. if (i == 4) {
  911. pageData.value[12].title4 = response.data[3].name
  912. pageData.value[12].category_id4 = response.data[3].category_id
  913. }
  914. }
  915. //获得内容
  916. //第三步:有几个就循环几次
  917. for (let i = 1; i <= pageCategory.value[12].children_count; i++) {
  918. if (i == 1) {
  919. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id1}&level=${3}&pagesize=${6}`);
  920. pageData.value[12].data1 = response.data
  921. }
  922. if (i == 2) {
  923. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id2}&level=${3}&pagesize=${6}`);
  924. pageData.value[12].data2 = response.data
  925. }
  926. if (i == 3) {
  927. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id3}&level=${3}&pagesize=${6}`);
  928. pageData.value[12].data3 = response.data
  929. }
  930. if (i == 4) {
  931. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id4}&level=${3}&pagesize=${6}`);
  932. pageData.value[12].data4 = response.data
  933. }
  934. }
  935. }
  936. }
  937. //板块13 轮播图 图文 文字
  938. if (listType == 13) {
  939. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  940. pageData.value[13].data = response.data;
  941. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  942. pageData.value[13].data2 = response2.data;
  943. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  944. pageData.value[13].data3 = response3.data;
  945. }
  946. }
  947. let scienceTitleList = [
  948. {
  949. id: 1,
  950. title: "农产畅销"
  951. },
  952. {
  953. id: 2,
  954. title: "农业在线"
  955. },
  956. {
  957. id: 3,
  958. title: "农产行情"
  959. },
  960. {
  961. id: 4,
  962. title: "名优特产"
  963. }
  964. ]
  965. //鼠标移入标题时,下方内容会发生变化
  966. let changeUl = (index) => {
  967. // console.log(index);
  968. if (process.browser) {
  969. let scienceListBox = document.querySelector('.scienceListBox');
  970. let titleList = document.querySelectorAll('.title>span>a')
  971. for (let i = 0; i < titleList.length; i++) {
  972. titleList[i].className = ''
  973. }
  974. titleList[index].setAttribute('class', 'current')
  975. if (index == 0) {
  976. scienceListBox.style.left = 0
  977. } else if (index == 1) {
  978. scienceListBox.style.left = "-790px"
  979. } else if (index == 2) {
  980. scienceListBox.style.left = "-1580px"
  981. } else if (index == 3) {
  982. scienceListBox.style.left = "-2370px"
  983. }
  984. }
  985. }
  986. //显示哪个tabs
  987. let showTabs = ref(1)
  988. let qhtabs = function (number) {
  989. console.log(number)
  990. showTabs.value = number
  991. }
  992. //挂载成功钩子函数
  993. onMounted(() => {
  994. //判断一下应该走搜索还是直接走二级分类
  995. console.log(111111)
  996. console.log(cityid)
  997. console.log(cityid != undefined)
  998. console.log(depId != undefined)
  999. if (cityid != undefined || depId != undefined) {
  1000. console.log(7777777777)
  1001. console.log(cityid)
  1002. console.log(depId)
  1003. //获得用户搜索的导航
  1004. selectWebsiteCategory()
  1005. } else {
  1006. console.log(888888888)
  1007. //直接获得所有二级导航
  1008. getWebsiteModelCategory()
  1009. }
  1010. })
  1011. function getDays(time) {
  1012. const date = new Date(time);
  1013. const year = date.getFullYear();
  1014. const month = date.getMonth() + 1;
  1015. const day = date.getDate();
  1016. return `${month}-${day}`;
  1017. }
  1018. </script>
  1019. <style lang="less" scoped>
  1020. a {
  1021. color: #333333;
  1022. }
  1023. //农民工part1
  1024. .farmingPartOne {
  1025. width: 100%;
  1026. height: 600px;
  1027. .inner {
  1028. height: 600px;
  1029. .innerLeft {
  1030. height: 600px;
  1031. .leftTop {
  1032. margin-top: 20px;
  1033. height: 320px;
  1034. .leftTopPhoto {
  1035. width: 387px;
  1036. height: 320px;
  1037. position: relative;
  1038. img {
  1039. width: 387px;
  1040. height: 320px;
  1041. }
  1042. span {
  1043. display: inline-block;
  1044. width: 387px;
  1045. height: 50px;
  1046. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  1047. color: #FFFFFF;
  1048. position: absolute;
  1049. bottom: 0;
  1050. left: 0;
  1051. font-family: Source Han Sans, Source Han Sans;
  1052. font-weight: 500;
  1053. font-size: 20px;
  1054. line-height: 23px;
  1055. padding-top: 11px;
  1056. padding-left: 13px;
  1057. box-sizing: border-box;
  1058. white-space: nowrap;
  1059. /* 禁止换行 */
  1060. overflow: hidden;
  1061. /* 隐藏超出部分 */
  1062. text-overflow: ellipsis;
  1063. /* 超出部分显示省略号 */
  1064. }
  1065. }
  1066. >ul.left {
  1067. margin-left: 25px;
  1068. width: 362px;
  1069. height: 320px;
  1070. margin-top: 5px;
  1071. >li {
  1072. em {
  1073. display: inline-block;
  1074. width: 8px;
  1075. height: 8px;
  1076. border-radius: 8px;
  1077. background-color: #d9d9d9;
  1078. margin-right: 8px;
  1079. vertical-align: middle;
  1080. }
  1081. width: 362px;
  1082. height: 22px;
  1083. font-family: PingFang SC,
  1084. PingFang SC;
  1085. font-weight: 500;
  1086. font-size: 18px;
  1087. color: #333333;
  1088. line-height: 22px;
  1089. text-align: left;
  1090. font-style: normal;
  1091. text-transform: none;
  1092. margin-bottom: 19px;
  1093. white-space: nowrap;
  1094. /* 禁止换行 */
  1095. overflow: hidden;
  1096. /* 隐藏超出部分 */
  1097. text-overflow: ellipsis;
  1098. /* 超出部分显示省略号 */
  1099. }
  1100. >li:hover {
  1101. a {
  1102. color: #088f04;
  1103. }
  1104. color: #088f04;
  1105. }
  1106. >li:hover>em {
  1107. background-color: #088f04;
  1108. }
  1109. }
  1110. }
  1111. .leftBottom {
  1112. height: 202px;
  1113. margin-top: 21px;
  1114. >li {
  1115. float: left;
  1116. width: 185px;
  1117. height: 202px;
  1118. margin-right: 10px;
  1119. >a {
  1120. >img {
  1121. width: 185px;
  1122. height: 139px;
  1123. }
  1124. }
  1125. >p {
  1126. width: 185px;
  1127. height: 58px;
  1128. padding: 8px 5px 12px;
  1129. box-sizing: border-box;
  1130. background-color: #f5f5f5;
  1131. font-family: PingFang SC, PingFang SC;
  1132. font-weight: 500;
  1133. font-size: 18px;
  1134. color: #333333;
  1135. line-height: 24px;
  1136. text-align: left;
  1137. font-style: normal;
  1138. text-transform: none;
  1139. display: -webkit-box;
  1140. -webkit-box-orient: vertical;
  1141. -webkit-line-clamp: 2;
  1142. /* 限制显示的行数 */
  1143. overflow: hidden;
  1144. text-overflow: ellipsis;
  1145. }
  1146. }
  1147. >li:hover {
  1148. a {
  1149. color: #088f04;
  1150. }
  1151. }
  1152. >li:last-child {
  1153. margin: 0;
  1154. }
  1155. }
  1156. }
  1157. .innerRight {
  1158. .rightList {
  1159. height: 540px;
  1160. margin-top: 20px;
  1161. >li {
  1162. height: 100px;
  1163. margin-bottom: 10px;
  1164. img {
  1165. width: 150px;
  1166. height: 100px;
  1167. }
  1168. >p {
  1169. width: 219px;
  1170. height: 100px;
  1171. display: -webkit-box;
  1172. -webkit-box-orient: vertical;
  1173. -webkit-line-clamp: 4;
  1174. overflow: hidden;
  1175. text-overflow: ellipsis;
  1176. word-break: break-all;
  1177. padding-left: 12px;
  1178. font-family: PingFang SC, PingFang SC;
  1179. font-weight: 400;
  1180. font-size: 16px;
  1181. color: #333333;
  1182. line-height: 24px;
  1183. text-align: left;
  1184. font-style: normal;
  1185. text-transform: none;
  1186. }
  1187. >p:hover {
  1188. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  1189. a {
  1190. color: #088f04;
  1191. }
  1192. }
  1193. }
  1194. }
  1195. }
  1196. }
  1197. }
  1198. //农民工part2
  1199. .farmingPartTwo {
  1200. width: 100%;
  1201. height: 600px;
  1202. .inner {
  1203. width: 1200px;
  1204. height: 600px;
  1205. >.farmer {
  1206. float: left;
  1207. width: 380px;
  1208. height: 600px;
  1209. margin-right: 29px;
  1210. // 农民工part2标题
  1211. >.title {
  1212. width: 380px;
  1213. }
  1214. >.title>h3 {
  1215. height: 36px;
  1216. font-family: Source Han Sans, Source Han Sans;
  1217. font-weight: bold;
  1218. font-size: 24px;
  1219. color: #000000;
  1220. line-height: 28px;
  1221. text-align: left;
  1222. font-style: normal;
  1223. text-transform: none;
  1224. border-bottom: 1px solid #139602;
  1225. }
  1226. >.title>h3>span>a {
  1227. float: right;
  1228. width: 56px;
  1229. height: 20px;
  1230. line-height: 24px;
  1231. font-weight: 400;
  1232. font-size: 14px;
  1233. color: #999999;
  1234. font-style: normal;
  1235. text-transform: none;
  1236. }
  1237. // 农民工part2图片
  1238. .PartTwoPhoto {
  1239. width: 380px;
  1240. height: 280px;
  1241. margin-top: 20px;
  1242. position: relative;
  1243. img {
  1244. width: 380px;
  1245. height: 280px;
  1246. }
  1247. span {
  1248. display: inline-block;
  1249. width: 380px;
  1250. height: 50px;
  1251. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  1252. color: #FFFFFF;
  1253. position: absolute;
  1254. bottom: 0;
  1255. left: 0;
  1256. font-family: Source Han Sans, Source Han Sans;
  1257. font-weight: 500;
  1258. font-size: 20px;
  1259. line-height: 23px;
  1260. padding-top: 11px;
  1261. padding-left: 13px;
  1262. box-sizing: border-box;
  1263. white-space: nowrap;
  1264. /* 禁止换行 */
  1265. overflow: hidden;
  1266. /* 隐藏超出部分 */
  1267. text-overflow: ellipsis;
  1268. /* 超出部分显示省略号 */
  1269. }
  1270. }
  1271. //农民工part2文字列表
  1272. .PartTwoList {
  1273. width: 380px;
  1274. height: 263px;
  1275. background-color: #fff;
  1276. box-shadow: 0px 4px 30px 1px rgba(174, 174, 174, 0.25);
  1277. padding-top: 20px;
  1278. box-sizing: border-box;
  1279. >li {
  1280. width: 380px;
  1281. height: 25px;
  1282. line-height: 25px;
  1283. font-family: PingFang SC, PingFang SC;
  1284. font-weight: 500;
  1285. font-size: 18px;
  1286. color: #333333;
  1287. margin-bottom: 16px;
  1288. white-space: nowrap;
  1289. /* 禁止换行 */
  1290. overflow: hidden;
  1291. /* 隐藏超出部分 */
  1292. text-overflow: ellipsis;
  1293. /* 超出部分显示省略号 */
  1294. >em {
  1295. display: inline-block;
  1296. width: 8px;
  1297. height: 8px;
  1298. background-color: #d9d9d9;
  1299. border-radius: 8px;
  1300. margin-left: 19px;
  1301. margin-right: 10px;
  1302. }
  1303. }
  1304. >li:hover {
  1305. color: #139602;
  1306. a {
  1307. color: #088f04;
  1308. }
  1309. }
  1310. >li:hover>em {
  1311. background-color: #139602;
  1312. }
  1313. }
  1314. }
  1315. >.farmer:last-child {
  1316. margin-right: 0;
  1317. }
  1318. }
  1319. }
  1320. //资讯推荐
  1321. .zixuntuijian {
  1322. width: 100%;
  1323. height: 600px;
  1324. .innerLeft {
  1325. // 左侧的上半部分
  1326. .zixunTop {
  1327. height: 286px;
  1328. .zixunLeft,
  1329. .zixunRight {
  1330. float: left;
  1331. width: 380px;
  1332. height: 286px;
  1333. .towPic {
  1334. display: flex;
  1335. width: 380px;
  1336. height: 116px;
  1337. margin-top: 20px;
  1338. .picBox {
  1339. width: 50%;
  1340. text-align: center;
  1341. }
  1342. .picBox:nth-child(3),
  1343. .picBox:nth-child(4),
  1344. .picBox:nth-child(5) {
  1345. display: none;
  1346. }
  1347. img {
  1348. width: 190px;
  1349. height: 120px;
  1350. }
  1351. .picBox:first-child {
  1352. margin-right: 5px;
  1353. }
  1354. }
  1355. // 标题部分
  1356. >.title {
  1357. width: 380px;
  1358. }
  1359. >.title>h3 {
  1360. height: 36px;
  1361. font-family: Source Han Sans, Source Han Sans;
  1362. font-weight: bold;
  1363. font-size: 24px;
  1364. color: #000000;
  1365. line-height: 28px;
  1366. text-align: left;
  1367. font-style: normal;
  1368. text-transform: none;
  1369. border-bottom: 1px solid #139602;
  1370. }
  1371. >.title>h3>span {
  1372. float: right;
  1373. width: 56px;
  1374. height: 20px;
  1375. line-height: 24px;
  1376. font-weight: 400;
  1377. font-size: 14px;
  1378. color: #999999;
  1379. font-style: normal;
  1380. text-transform: none;
  1381. }
  1382. .photo_text {
  1383. article {
  1384. white-space: nowrap;
  1385. /* 禁止换行 */
  1386. overflow: hidden;
  1387. /* 隐藏超出部分 */
  1388. text-overflow: ellipsis;
  1389. /* 超出部分显示省略号 */
  1390. li {
  1391. white-space: nowrap;
  1392. /* 禁止换行 */
  1393. overflow: hidden;
  1394. /* 隐藏超出部分 */
  1395. text-overflow: ellipsis;
  1396. /* 超出部分显示省略号 */
  1397. a:hover {
  1398. color: #088f04;
  1399. }
  1400. }
  1401. li:hover {
  1402. color: #088f04;
  1403. a {
  1404. color: #088f04;
  1405. }
  1406. }
  1407. img {
  1408. width: 100px;
  1409. }
  1410. }
  1411. li {
  1412. width: 380px;
  1413. height: 25px;
  1414. font-family: PingFang SC, PingFang SC;
  1415. font-weight: 500;
  1416. font-size: 18px;
  1417. color: #333333;
  1418. line-height: 21px;
  1419. text-align: left;
  1420. font-style: normal;
  1421. text-transform: none;
  1422. margin-bottom: 9px;
  1423. em {
  1424. display: inline-block;
  1425. width: 8px;
  1426. height: 8px;
  1427. border-radius: 8px;
  1428. margin-right: 10px;
  1429. background-color: #d9d9d9;
  1430. }
  1431. }
  1432. }
  1433. }
  1434. // 左侧的资讯推荐的左半部分
  1435. .zixunLeft {
  1436. margin-right: 30px;
  1437. .photo_text {
  1438. li:first-child {
  1439. width: 380px;
  1440. height: 120px;
  1441. margin-top: 20px;
  1442. margin-bottom: 16px;
  1443. position: relative;
  1444. img {
  1445. float: left;
  1446. width: 160px;
  1447. height: 120px;
  1448. }
  1449. div {
  1450. float: left;
  1451. width: 220px;
  1452. height: 120px;
  1453. padding-left: 15px;
  1454. padding-top: 6px;
  1455. box-sizing: border-box;
  1456. background-color: #f6f6f6;
  1457. h5 {
  1458. width: 200px;
  1459. height: 54px;
  1460. white-space: nowrap;
  1461. overflow: hidden;
  1462. text-overflow: ellipsis;
  1463. font-family: Source Han Sans, Source Han Sans;
  1464. font-weight: 500;
  1465. font-size: 18px;
  1466. color: #333333;
  1467. line-height: 26px;
  1468. text-align: left;
  1469. font-style: normal;
  1470. text-transform: none;
  1471. }
  1472. p {
  1473. width: 200px;
  1474. height: 22px;
  1475. line-height: 20px;
  1476. position: absolute;
  1477. bottom: 5px;
  1478. right: 0;
  1479. span {
  1480. display: inline-block;
  1481. width: 75px;
  1482. height: 18px;
  1483. font-family: Source Han Sans, Source Han Sans;
  1484. font-weight: 400;
  1485. font-size: 12px;
  1486. color: #999999;
  1487. text-align: left;
  1488. line-height: 14px;
  1489. font-style: normal;
  1490. text-transform: none;
  1491. }
  1492. span:last-child {
  1493. width: 90px;
  1494. text-align: right;
  1495. }
  1496. }
  1497. }
  1498. }
  1499. >li {
  1500. width: 380px;
  1501. height: 25px;
  1502. font-family: PingFang SC, PingFang SC;
  1503. font-weight: 500;
  1504. font-size: 18px;
  1505. color: #333333;
  1506. line-height: 21px;
  1507. text-align: left;
  1508. font-style: normal;
  1509. text-transform: none;
  1510. margin-bottom: 9px;
  1511. em {
  1512. display: inline-block;
  1513. width: 8px;
  1514. height: 8px;
  1515. border-radius: 8px;
  1516. margin-right: 10px;
  1517. background-color: #d9d9d9;
  1518. }
  1519. }
  1520. }
  1521. }
  1522. // 左侧的资讯推荐的右半部分
  1523. .zixunRight {
  1524. width: 380px;
  1525. height: 229px;
  1526. .photo_text {
  1527. margin-top: 20px;
  1528. >li:nth-child(1) {
  1529. display: none;
  1530. }
  1531. >li:nth-child(2) {
  1532. display: none;
  1533. }
  1534. }
  1535. }
  1536. }
  1537. //左侧的下半部分
  1538. .zixunBottom {
  1539. width: 790px;
  1540. height: 280px;
  1541. margin-top: 40px;
  1542. img {
  1543. width: 498px;
  1544. height: 280px;
  1545. }
  1546. >.leftList {
  1547. width: 290px;
  1548. height: 280px;
  1549. background-color: #f6f6f6;
  1550. padding: 11px 26px 6px 20px;
  1551. box-sizing: border-box;
  1552. >li {
  1553. width: 296px;
  1554. height: 35px;
  1555. line-height: 35px;
  1556. color: #666666;
  1557. font-size: 14px;
  1558. margin-bottom: 18px;
  1559. h4 {
  1560. font-family: Source Han Sans, Source Han Sans;
  1561. height: 35px;
  1562. line-height: 35px;
  1563. font-size: 18px;
  1564. font-weight: 400;
  1565. white-space: nowrap;
  1566. /* 禁止换行 */
  1567. overflow: hidden;
  1568. /* 隐藏超出部分 */
  1569. text-overflow: ellipsis;
  1570. /* 超出部分显示省略号 */
  1571. color: #333333;
  1572. width: 260px;
  1573. em {
  1574. display: inline-block;
  1575. width: 8px;
  1576. height: 8px;
  1577. background-color: #333333;
  1578. border-radius: 8px;
  1579. margin-right: 5px;
  1580. }
  1581. }
  1582. p {
  1583. width: 249px;
  1584. height: 48px;
  1585. line-height: 24px;
  1586. padding-left: 14px;
  1587. display: -webkit-box;
  1588. -webkit-box-orient: vertical;
  1589. -webkit-line-clamp: 2;
  1590. /* 限制显示的行数 */
  1591. overflow: hidden;
  1592. text-overflow: ellipsis;
  1593. }
  1594. }
  1595. >li:hover,
  1596. >li:hover>h4>a,
  1597. >li:hover>p>a {
  1598. color: #088f04;
  1599. }
  1600. >li:hover>h4>em {
  1601. background-color: #088f04;
  1602. }
  1603. }
  1604. }
  1605. }
  1606. .innerRight {
  1607. .information {
  1608. width: 380px;
  1609. margin-top: 20px;
  1610. >li {
  1611. width: 380px;
  1612. height: 120px;
  1613. margin-bottom: 21px;
  1614. img {
  1615. float: left;
  1616. width: 160px;
  1617. height: 120px;
  1618. }
  1619. .text {
  1620. float: left;
  1621. width: 220px;
  1622. height: 120px;
  1623. padding-left: 15px;
  1624. box-sizing: border-box;
  1625. >h5 {
  1626. width: 199px;
  1627. height: 49px;
  1628. display: -webkit-box;
  1629. -webkit-box-orient: vertical;
  1630. -webkit-line-clamp: 2;
  1631. overflow: hidden;
  1632. padding-top: 6px;
  1633. font-family: PingFang SC, PingFang SC;
  1634. font-weight: 600;
  1635. font-size: 18px;
  1636. color: #333333;
  1637. line-height: 26px;
  1638. text-align: left;
  1639. font-style: normal;
  1640. text-transform: none;
  1641. }
  1642. >p {
  1643. width: 198px;
  1644. height: 20px;
  1645. display: -webkit-box;
  1646. -webkit-box-orient: vertical;
  1647. -webkit-line-clamp: 2;
  1648. overflow: hidden;
  1649. text-overflow: ellipsis;
  1650. word-break: break-all;
  1651. margin-top: 16px;
  1652. font-family: PingFang SC, PingFang SC;
  1653. font-weight: 400;
  1654. font-size: 14px;
  1655. color: #666666;
  1656. line-height: 24px;
  1657. text-align: left;
  1658. font-style: normal;
  1659. text-transform: none;
  1660. margin-top: 40px;
  1661. }
  1662. }
  1663. .text:hover {
  1664. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  1665. background-color: #fff;
  1666. h5 {
  1667. a {
  1668. color: #088f04;
  1669. }
  1670. }
  1671. p {
  1672. color: #088f04;
  1673. }
  1674. }
  1675. }
  1676. }
  1677. }
  1678. }
  1679. // 农民工
  1680. .farming {
  1681. width: 100%;
  1682. height: 605px;
  1683. // 左侧
  1684. .innerLeft {
  1685. width: 790px;
  1686. height: 605px;
  1687. margin-right: 21px;
  1688. // background-color: #ccc;
  1689. .farmer {
  1690. width: 790px;
  1691. height: 312px;
  1692. >h3 {
  1693. height: 36px;
  1694. font-family: Source Han Sans, Source Han Sans;
  1695. font-weight: bold;
  1696. font-size: 24px;
  1697. color: #000000;
  1698. line-height: 28px;
  1699. text-align: left;
  1700. font-style: normal;
  1701. text-transform: none;
  1702. border-bottom: 1px solid #139602;
  1703. >span {
  1704. float: right;
  1705. width: 56px;
  1706. height: 20px;
  1707. line-height: 24px;
  1708. font-weight: 400;
  1709. font-size: 14px;
  1710. color: #999999;
  1711. font-style: normal;
  1712. text-transform: none;
  1713. }
  1714. }
  1715. >ul {
  1716. margin-top: 20px;
  1717. >li {
  1718. float: left;
  1719. width: 362px;
  1720. height: 22px;
  1721. font-weight: 500;
  1722. font-size: 18px;
  1723. color: #333333;
  1724. line-height: 21px;
  1725. text-align: left;
  1726. margin-bottom: 29px;
  1727. margin-right: 27px;
  1728. white-space: nowrap;
  1729. /* 禁止换行 */
  1730. overflow: hidden;
  1731. /* 隐藏超出部分 */
  1732. text-overflow: ellipsis;
  1733. /* 超出部分显示省略号 */
  1734. >em {
  1735. display: inline-block;
  1736. width: 8px;
  1737. height: 8px;
  1738. background-color: #d9d9d9;
  1739. border-radius: 4px;
  1740. margin: 5px 8px 6px;
  1741. vertical-align: middle;
  1742. }
  1743. }
  1744. >li:hover {
  1745. color: #139602;
  1746. a {
  1747. color: #139602;
  1748. }
  1749. }
  1750. }
  1751. }
  1752. .farmerbottom {
  1753. width: 790px;
  1754. height: 280px;
  1755. img {
  1756. width: 498px;
  1757. height: 280px;
  1758. }
  1759. >.leftList {
  1760. width: 290px;
  1761. height: 280px;
  1762. background-color: #f6f6f6;
  1763. padding: 11px 26px 6px 20px;
  1764. box-sizing: border-box;
  1765. >li {
  1766. width: 296px;
  1767. height: 75px;
  1768. color: #666666;
  1769. font-size: 14px;
  1770. margin-bottom: 18px;
  1771. h4 {
  1772. font-family: Source Han Sans, Source Han Sans;
  1773. height: 27px;
  1774. line-height: 21px;
  1775. font-size: 18px;
  1776. color: #333333;
  1777. em {
  1778. display: inline-block;
  1779. width: 8px;
  1780. height: 8px;
  1781. background-color: #333333;
  1782. border-radius: 8px;
  1783. }
  1784. }
  1785. p {
  1786. width: 249px;
  1787. height: 48px;
  1788. line-height: 24px;
  1789. padding-left: 14px;
  1790. }
  1791. }
  1792. >li:hover,
  1793. >li:hover>h4 {
  1794. color: #088f04;
  1795. }
  1796. >li:hover>h4>em {
  1797. background-color: #088f04;
  1798. }
  1799. }
  1800. }
  1801. }
  1802. // 右侧
  1803. .innerRight {
  1804. width: 380px;
  1805. height: 605px;
  1806. // 标题部分
  1807. >h3 {
  1808. height: 36px;
  1809. font-family: Source Han Sans, Source Han Sans;
  1810. font-weight: bold;
  1811. font-size: 24px;
  1812. color: #000000;
  1813. line-height: 28px;
  1814. text-align: left;
  1815. font-style: normal;
  1816. text-transform: none;
  1817. border-bottom: 1px solid #139602;
  1818. >span {
  1819. float: right;
  1820. width: 56px;
  1821. height: 20px;
  1822. line-height: 24px;
  1823. font-weight: 400;
  1824. font-size: 14px;
  1825. color: #999999;
  1826. font-style: normal;
  1827. text-transform: none;
  1828. }
  1829. }
  1830. // 轮播图
  1831. .banner {
  1832. width: 380px;
  1833. height: 214px;
  1834. margin-top: 20px;
  1835. }
  1836. .banner_b_img {
  1837. // 图片部分
  1838. .photo {
  1839. height: 104px;
  1840. margin-top: 10px;
  1841. display: flex;
  1842. }
  1843. .photoL,
  1844. .photoR {
  1845. float: left;
  1846. width: 185px;
  1847. height: 104px;
  1848. position: relative;
  1849. img {
  1850. width: 185px;
  1851. height: 104px;
  1852. }
  1853. span {
  1854. position: absolute;
  1855. top: 0;
  1856. left: 0;
  1857. display: inline-block;
  1858. padding-left: 7px;
  1859. box-sizing: border-box;
  1860. width: 185px;
  1861. height: 22px;
  1862. background-color: rgba(0, 0, 0, 0.5);
  1863. font-weight: 500px;
  1864. font-size: 14px;
  1865. color: #FFFFFF;
  1866. line-height: 22px;
  1867. white-space: nowrap;
  1868. /* 禁止换行 */
  1869. overflow: hidden;
  1870. /* 隐藏超出部分 */
  1871. text-overflow: ellipsis;
  1872. /* 超出部分显示省略号 */
  1873. }
  1874. }
  1875. .photoL {
  1876. margin-right: 10px;
  1877. }
  1878. }
  1879. .banner_text_list {
  1880. ul {
  1881. width: 380px;
  1882. height: 186px;
  1883. margin-top: 30px;
  1884. >li {
  1885. a {
  1886. height: 22px;
  1887. font-size: 16px;
  1888. &:hover {
  1889. color: #139609;
  1890. }
  1891. }
  1892. height: 22px;
  1893. padding-bottom: 16px;
  1894. white-space: nowrap;
  1895. /* 禁止换行 */
  1896. overflow: hidden;
  1897. /* 隐藏超出部分 */
  1898. text-overflow: ellipsis;
  1899. /* 超出部分显示省略号 */
  1900. >strong {
  1901. display: inline-block;
  1902. width: 24px;
  1903. height: 24px;
  1904. line-height: 24px;
  1905. background-color: #cecece;
  1906. padding-left: 6px;
  1907. box-sizing: border-box;
  1908. font-family: Source Han Sans, Source Han Sans;
  1909. font-weight: 500;
  1910. font-size: 18px;
  1911. color: #FFFFFF;
  1912. font-style: normal;
  1913. text-transform: none;
  1914. }
  1915. >em {
  1916. display: inline-block;
  1917. width: 6px;
  1918. height: 6px;
  1919. border-radius: 10px;
  1920. border: 2px solid #8CBA86;
  1921. margin-right: 10px;
  1922. }
  1923. >span {
  1924. width: 380px;
  1925. height: 22px;
  1926. font-family: PingFang SC, PingFang SC;
  1927. font-weight: 500;
  1928. font-size: 18px;
  1929. color: #333333;
  1930. line-height: 21px;
  1931. text-align: left;
  1932. font-style: normal;
  1933. text-transform: none;
  1934. }
  1935. >span:hover {
  1936. color: #139609;
  1937. }
  1938. }
  1939. }
  1940. }
  1941. }
  1942. }
  1943. //三农科教
  1944. .scienceEducation {
  1945. height: 600px;
  1946. margin-bottom: 76px;
  1947. .innerLeft,
  1948. .innerRight {
  1949. float: left;
  1950. }
  1951. // 左侧
  1952. .innerLeft {
  1953. width: 790px;
  1954. height: 616px;
  1955. margin-right: 21px;
  1956. }
  1957. // 右侧
  1958. .innerRight {
  1959. width: 380px;
  1960. height: 600px;
  1961. // 标题部分
  1962. >h3 {
  1963. height: 36px;
  1964. font-family: Source Han Sans, Source Han Sans;
  1965. font-weight: bold;
  1966. font-size: 24px;
  1967. color: #000000;
  1968. line-height: 28px;
  1969. text-align: left;
  1970. font-style: normal;
  1971. text-transform: none;
  1972. border-bottom: 1px solid #139602;
  1973. >span {
  1974. float: right;
  1975. width: 56px;
  1976. height: 20px;
  1977. line-height: 24px;
  1978. font-weight: 400;
  1979. font-size: 14px;
  1980. color: #999999;
  1981. font-style: normal;
  1982. text-transform: none;
  1983. }
  1984. }
  1985. ul.sannongList {
  1986. width: 380px;
  1987. height: 186px;
  1988. >li {
  1989. height: 22px;
  1990. padding-top: 16px;
  1991. white-space: nowrap;
  1992. /* 禁止换行 */
  1993. overflow: hidden;
  1994. /* 隐藏超出部分 */
  1995. text-overflow: ellipsis;
  1996. /* 超出部分显示省略号 */
  1997. >strong {
  1998. display: inline-block;
  1999. width: 24px;
  2000. height: 24px;
  2001. line-height: 24px;
  2002. background-color: #cecece;
  2003. padding-left: 6px;
  2004. box-sizing: border-box;
  2005. font-family: Source Han Sans, Source Han Sans;
  2006. font-weight: 500;
  2007. font-size: 18px;
  2008. color: #FFFFFF;
  2009. font-style: normal;
  2010. text-transform: none;
  2011. }
  2012. >em {
  2013. display: inline-block;
  2014. width: 6px;
  2015. height: 6px;
  2016. border-radius: 10px;
  2017. border: 2px solid #8CBA86;
  2018. }
  2019. >span {
  2020. width: 380px;
  2021. height: 22px;
  2022. font-family: PingFang SC, PingFang SC;
  2023. font-weight: 500;
  2024. font-size: 18px;
  2025. color: #333333;
  2026. line-height: 21px;
  2027. text-align: left;
  2028. font-style: normal;
  2029. text-transform: none;
  2030. padding-left: 9px;
  2031. }
  2032. >span:hover {
  2033. color: #139609;
  2034. a {
  2035. color: #088f04;
  2036. }
  2037. }
  2038. }
  2039. }
  2040. // 轮播图
  2041. .banner {
  2042. width: 380px;
  2043. height: 214px;
  2044. margin-top: 45px;
  2045. }
  2046. .banner_b_img {
  2047. // 图片部分
  2048. .photo {
  2049. height: 104px;
  2050. margin-top: 10px;
  2051. display: flex;
  2052. }
  2053. .photoL,
  2054. .photoR {
  2055. float: left;
  2056. width: 185px;
  2057. height: 104px;
  2058. position: relative;
  2059. img {
  2060. width: 185px;
  2061. height: 104px;
  2062. }
  2063. span {
  2064. position: absolute;
  2065. top: 0;
  2066. left: 0;
  2067. display: inline-block;
  2068. padding-left: 7px;
  2069. box-sizing: border-box;
  2070. width: 185px;
  2071. height: 22px;
  2072. background-color: rgba(0, 0, 0, 0.5);
  2073. font-weight: 500px;
  2074. font-size: 14px;
  2075. color: #FFFFFF;
  2076. line-height: 22px;
  2077. white-space: nowrap;
  2078. /* 禁止换行 */
  2079. overflow: hidden;
  2080. /* 隐藏超出部分 */
  2081. text-overflow: ellipsis;
  2082. /* 超出部分显示省略号 */
  2083. a {
  2084. color: #fff;
  2085. }
  2086. }
  2087. }
  2088. .photoL {
  2089. margin-right: 10px;
  2090. }
  2091. }
  2092. }
  2093. }
  2094. // 标题
  2095. .scienceTitle {
  2096. height: 37px;
  2097. h5 {
  2098. float: left;
  2099. width: 96px;
  2100. height: 34px;
  2101. font-family: PingFang SC, PingFang SC;
  2102. font-weight: 600;
  2103. font-size: 24px;
  2104. color: #000000;
  2105. line-height: 28px;
  2106. text-align: left;
  2107. font-style: normal;
  2108. text-transform: none;
  2109. margin-right: 20px;
  2110. }
  2111. >p {
  2112. float: left;
  2113. height: 37px;
  2114. line-height: 30px;
  2115. display: flex;
  2116. >span {
  2117. display: inline-block;
  2118. //height: 20px;
  2119. line-height: 20px;
  2120. text-align: center;
  2121. margin: 4px 0px 3px;
  2122. padding: 0 20px;
  2123. //border-right: 1px solid #ccc;
  2124. font-weight: 500;
  2125. font-size: 20px;
  2126. cursor: pointer;
  2127. padding-bottom: 11px;
  2128. // >a {
  2129. // display: inline-block;
  2130. // padding-bottom: 11px;
  2131. // font-family: PingFang SC, PingFang SC;
  2132. // font-weight: 500;
  2133. // font-size: 20px;
  2134. // color: #666666;
  2135. // line-height: 20px;
  2136. // font-style: normal;
  2137. // text-transform: none;
  2138. // box-sizing: border-box;
  2139. // }
  2140. .current {
  2141. color: #139602;
  2142. border-bottom: 1px solid #139602;
  2143. }
  2144. }
  2145. >span:nth-child(4) {
  2146. border-right: none;
  2147. }
  2148. >span:hover>a {
  2149. color: #139602;
  2150. border-bottom: 1px solid #139602;
  2151. }
  2152. }
  2153. }
  2154. .box {
  2155. width: 790px;
  2156. height: 570px;
  2157. position: relative;
  2158. overflow: hidden;
  2159. }
  2160. .fade-in {
  2161. animation: fadeIn 1s ease-in-out;
  2162. }
  2163. .fade-enter-from,
  2164. .fade-leave-to {
  2165. opacity: 0;
  2166. }
  2167. .fade-enter-to,
  2168. .fade-leave-from {
  2169. opacity: 1;
  2170. }
  2171. .fade-enter-active,
  2172. .fade-leave-active {
  2173. transition: opacity 1s ease;
  2174. }
  2175. .scienceListBox {
  2176. width: 3160px;
  2177. height: 570px;
  2178. position: absolute;
  2179. top: 0;
  2180. left: 0;
  2181. transition: all 3s linear 0;
  2182. }
  2183. // 标题下列表
  2184. .scienceList {
  2185. width: 790px;
  2186. height: 570px;
  2187. float: left;
  2188. margin-top: 17px;
  2189. >li {
  2190. width: 250px;
  2191. height: 276px;
  2192. float: left;
  2193. margin-right: 20px;
  2194. position: relative;
  2195. img {
  2196. width: 250px;
  2197. height: 220px;
  2198. border-top-left-radius: 40px;
  2199. border-bottom-right-radius: 40px;
  2200. }
  2201. >p {
  2202. height: 50px;
  2203. width: 248px;
  2204. font-family: PingFang SC, PingFang SC;
  2205. font-weight: 600;
  2206. font-size: 18px;
  2207. color: #333333;
  2208. line-height: 24px;
  2209. text-align: left;
  2210. font-style: normal;
  2211. text-transform: none;
  2212. display: -webkit-box;
  2213. -webkit-box-orient: vertical;
  2214. -webkit-line-clamp: 2;
  2215. /* 限制显示的行数 */
  2216. overflow: hidden;
  2217. text-overflow: ellipsis;
  2218. }
  2219. // >p:hover {
  2220. // color: #139602;
  2221. // }
  2222. }
  2223. >li:hover {
  2224. color: #088f04;
  2225. >p:hover {
  2226. a {
  2227. color: #088f04;
  2228. }
  2229. // color: #139602;
  2230. }
  2231. }
  2232. >li:nth-child(3),
  2233. >li:nth-child(6) {
  2234. margin-right: 0;
  2235. }
  2236. >li::before {
  2237. content: "";
  2238. display: inline-block;
  2239. width: 40px;
  2240. height: 20px;
  2241. position: absolute;
  2242. top: 0;
  2243. right: 0;
  2244. background-image: url("../../static/images/Component 209.png");
  2245. }
  2246. }
  2247. .active {
  2248. border-bottom: 3px solid #139602;
  2249. height: 36px;
  2250. display: inline-block;
  2251. }
  2252. .noSelect {
  2253. border-bottom: 3px solid #fff;
  2254. height: 36px;
  2255. display: inline-block;
  2256. }
  2257. </style>